home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / u_man / cat3 / Tcl / file.z / file
Encoding:
Text File  |  1998-10-30  |  8.4 KB  |  199 lines

  1.  
  2.  
  3.  
  4. ffffiiiilllleeee((((3333TTTTccccllll))))                                                          ffffiiiilllleeee((((3333TTTTccccllll))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      file - Manipulate file names and attributes
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ffffiiiilllleeee _o_p_t_i_o_n _n_a_m_e ?_a_r_g _a_r_g ...?
  13.  
  14.  
  15. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  16.      This command provides several operations on a file's name or attributes.
  17.      _N_a_m_e is the name of a file; if it starts with a tilde, then tilde
  18.      substitution is done before executing the command (see the manual entry
  19.      for TTTTccccllll____TTTTiiiillllddddeeeeSSSSuuuubbbbsssstttt for details).  _O_p_t_i_o_n indicates what to do with the
  20.      file name.  Any unique abbreviation for _o_p_t_i_o_n is acceptable.  The valid
  21.      options are:
  22.  
  23.      ffffiiiilllleeee aaaattttiiiimmmmeeee _n_a_m_e
  24.           Returns a decimal string giving the time at which file _n_a_m_e was last
  25.           accessed.  The time is measured in the standard POSIX fashion as
  26.           seconds from a fixed starting time (often January 1, 1970).  If the
  27.           file doesn't exist or its access time cannot be queried then an
  28.           error is generated.
  29.  
  30.      ffffiiiilllleeee ddddiiiirrrrnnnnaaaammmmeeee _n_a_m_e
  31.           Returns all of the characters in _n_a_m_e up to but not including the
  32.           last slash character.  If there are no slashes in _n_a_m_e then returns
  33.           ``.''.  If the last slash in _n_a_m_e is its first character, then
  34.           return ``/''.
  35.  
  36.      ffffiiiilllleeee eeeexxxxeeeeccccuuuuttttaaaabbbblllleeee _n_a_m_e
  37.           Returns 1111 if file _n_a_m_e is executable by the current user, 0000
  38.           otherwise.
  39.  
  40.      ffffiiiilllleeee eeeexxxxiiiissssttttssss _n_a_m_e
  41.           Returns 1111 if file _n_a_m_e exists and the current user has search
  42.           privileges for the directories leading to it, 0000 otherwise.
  43.  
  44.      ffffiiiilllleeee eeeexxxxtttteeeennnnssssiiiioooonnnn _n_a_m_e
  45.           Returns all of the characters in _n_a_m_e after and including the last
  46.           dot in the last element of _n_a_m_e.  If there is no dot in the last
  47.           element of _n_a_m_e then returns the empty string.
  48.  
  49.      ffffiiiilllleeee iiiissssddddiiiirrrreeeeccccttttoooorrrryyyy _n_a_m_e
  50.           Returns 1111 if file _n_a_m_e is a directory, 0000 otherwise.
  51.  
  52.      ffffiiiilllleeee iiiissssffffiiiilllleeee _n_a_m_e
  53.           Returns 1111 if file _n_a_m_e is a regular file, 0000 otherwise.
  54.  
  55.      ffffiiiilllleeee llllssssttttaaaatttt _n_a_m_e _v_a_r_N_a_m_e
  56.           Same as ssssttttaaaatttt option (see below) except uses the _l_s_t_a_t kernel call
  57.           instead of _s_t_a_t.  This means that if _n_a_m_e refers to a symbolic link
  58.           the information returned in _v_a_r_N_a_m_e is for the link rather than the
  59.           file it refers to.  On systems that don't support symbolic links
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. ffffiiiilllleeee((((3333TTTTccccllll))))                                                          ffffiiiilllleeee((((3333TTTTccccllll))))
  71.  
  72.  
  73.  
  74.           this option behaves exactly the same as the ssssttttaaaatttt option.
  75.  
  76.      ffffiiiilllleeee mmmmttttiiiimmmmeeee _n_a_m_e
  77.           Returns a decimal string giving the time at which file _n_a_m_e was last
  78.           modified.  The time is measured in the standard POSIX fashion as
  79.           seconds from a fixed starting time (often January 1, 1970).  If the
  80.           file doesn't exist or its modified time cannot be queried then an
  81.           error is generated.
  82.  
  83.      ffffiiiilllleeee oooowwwwnnnneeeedddd _n_a_m_e
  84.           Returns 1111 if file _n_a_m_e is owned by the current user, 0000 otherwise.
  85.  
  86.      ffffiiiilllleeee rrrreeeeaaaaddddaaaabbbblllleeee _n_a_m_e
  87.           Returns 1111 if file _n_a_m_e is readable by the current user, 0000 otherwise.
  88.  
  89.      ffffiiiilllleeee rrrreeeeaaaaddddlllliiiinnnnkkkk _n_a_m_e
  90.           Returns the value of the symbolic link given by _n_a_m_e (i.e. the name
  91.           of the file it points to).  If _n_a_m_e isn't a symbolic link or its
  92.           value cannot be read, then an error is returned.  On systems that
  93.           don't support symbolic links this option is undefined.
  94.  
  95.      ffffiiiilllleeee rrrroooooooottttnnnnaaaammmmeeee _n_a_m_e
  96.           Returns all of the characters in _n_a_m_e up to but not including the
  97.           last ``.'' character in the name.  If _n_a_m_e doesn't contain a dot,
  98.           then returns _n_a_m_e.
  99.  
  100.      ffffiiiilllleeee ssssiiiizzzzeeee _n_a_m_e
  101.           Returns a decimal string giving the size of file _n_a_m_e in bytes.  If
  102.           the file doesn't exist or its size cannot be queried then an error
  103.           is generated.
  104.  
  105.      ffffiiiilllleeee ssssttttaaaatttt  _n_a_m_e _v_a_r_N_a_m_e
  106.           Invokes the ssssttttaaaatttt kernel call on _n_a_m_e, and uses the variable given by
  107.           _v_a_r_N_a_m_e to hold information returned from the kernel call.  _V_a_r_N_a_m_e
  108.           is treated as an array variable, and the following elements of that
  109.           variable are set: aaaattttiiiimmmmeeee, ccccttttiiiimmmmeeee, ddddeeeevvvv, ggggiiiidddd, iiiinnnnoooo, mmmmooooddddeeee, mmmmttttiiiimmmmeeee, nnnnlllliiiinnnnkkkk,
  110.           ssssiiiizzzzeeee, ttttyyyyppppeeee, uuuuiiiidddd.  Each element except ttttyyyyppppeeee is a decimal string with
  111.           the value of the corresponding field from the ssssttttaaaatttt return structure;
  112.           see the manual entry for ssssttttaaaatttt for details on the meanings of the
  113.           values.  The ttttyyyyppppeeee element gives the type of the file in the same
  114.           form returned by the command ffffiiiilllleeee ttttyyyyppppeeee.  This command returns an
  115.           empty string.
  116.  
  117.      ffffiiiilllleeee ttttaaaaiiiillll _n_a_m_e
  118.           Returns all of the characters in _n_a_m_e after the last slash.  If _n_a_m_e
  119.           contains no slashes then returns _n_a_m_e.
  120.  
  121.      ffffiiiilllleeee ttttyyyyppppeeee _n_a_m_e
  122.           Returns a string giving the type of file _n_a_m_e, which will be one of
  123.           ffffiiiilllleeee, ddddiiiirrrreeeeccccttttoooorrrryyyy, cccchhhhaaaarrrraaaacccctttteeeerrrrSSSSppppeeeecccciiiiaaaallll, bbbblllloooocccckkkkSSSSppppeeeecccciiiiaaaallll, ffffiiiiffffoooo, lllliiiinnnnkkkk, or
  124.           ssssoooocccckkkkeeeetttt.
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. ffffiiiilllleeee((((3333TTTTccccllll))))                                                          ffffiiiilllleeee((((3333TTTTccccllll))))
  137.  
  138.  
  139.  
  140.      ffffiiiilllleeee wwwwrrrriiiittttaaaabbbblllleeee _n_a_m_e
  141.           Returns 1111 if file _n_a_m_e is writable by the current user, 0000 otherwise.
  142.  
  143.  
  144. KKKKEEEEYYYYWWWWOOOORRRRDDDDSSSS
  145.      attributes, directory, file, name, stat
  146.  
  147.  
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.